package com.link.base.base.opty.dao.mybatis.mapper;

import com.link.base.base.opty.model.Opty;
import com.link.core.basic.dao.mapper.BasicMapper;

import java.util.List;

/**
 * @author yrf
 * @date unknown
 * @comments 商机操作处理
 */
public interface OptyMapper extends BasicMapper<Opty> {

    /**
     * <p>商机状态更新</p>
     *
     * @param record
     * @return
     * @throws Exception
     */
    public void optyStatusUpdate(Opty record) throws Exception;

    /**
     * <p>查询商机报表</p>
     *
     * @param record
     * @return
     * @throws Exception
     */
    public List<Opty> queryOptyReportPage(Opty record) throws Exception;

    /**
     * <p>查询商机报表组别</p>
     *
     * @param record
     * @return List Opty
     * @throws Exception
     */
    public List<Opty> queryOptyReportOrg(Opty record) throws Exception;

    /**
     * <p>查询商机报表组别</p>
     *
     * @param record
     * @return List Opty
     * @throws Exception
     */
    public List<Opty> queryOptyReportOrgIdByName(Opty record) throws Exception;

    /**
     * <p>根据月份成单率查询商机数据与总金额</p>
     *
     * @author yrf
     * @param record
     * @return
     * @throws Exception
     */
    public List<Opty> queryCountAndAmountByMonthAndRate(Opty record) throws Exception;

    /**
     * <p>根据赢单率查询下级组织商机各金额 </p>
     *
     * @author yrf
     * @param record
     * @return
     * @throws Exception
     */
    public List<Opty> queryOrgAmountByRate(Opty record) throws Exception;

    /**
     * <p>商机top10，amount+attr_22</p>
     *
     * @author yrf
     * @param record
     * @return
     * @throws Exception
     */
    public List<Opty> queryOptyTop10(Opty record) throws Exception;


    /**
     * <p>获取客户id</p>
     * @param record 商机
     * @return List Opty
     */
    public List<Opty> getOptyList(Opty record);
}
